import BaseController from '../../../imvc/controller'
import View from './view'
import model from './model'
import * as $prototype from './prototype'
import config from '../../../server.config'

export default class Detail extends BaseController {
  View = View
  initialState = model.initialState
  actions = model.actions
  preload = {
    style: '/app-playground/css/style.css',
    adjust: '/app-playground/css/adjust.css',
  }
  async componentDidMount() {
    this.fetchGetHoldOrder()
  }
  async componentWillCreate() {
    // await this.fetchPenaltyList()
  }
  handleBackToLists = () => {
    const { history } = this
    history.push('/playground/lists')
  }
  handleReverse = () => {
    const { store } = this
    const { REVERT_PERCENTS } = store.actions
    REVERT_PERCENTS()
  }
}

Object.assign(Detail.prototype, $prototype)
